﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HerGoS.Interfaces;

namespace HerGoS.Administration.Entities
{
    [Serializable]
    public class Usuario : Persona
    {
        #region Construction
        public Usuario() : base()
		{
            Initializer();
        }
        private void Initializer()
        {
            Nick = "";
            Bloqueado = false;
            IsSuperAdmin = false;
            Roles = new List<Rol>();
        }

		#endregion

        #region DataMembers
        private string _Nick;
        private bool _Bloqueado;
        private bool _IsSuperAdmin;
        private List<Rol> _roles;
        private Area _Area;
        private Puesto _Puesto;
        private string _Clave;
        #endregion

        #region Properties
        public String Nick
        {
            get { return _Nick; }
            set { this._Nick = value; }
        }

        public bool Bloqueado
        {
            get { return _Bloqueado; }
            set { this._Bloqueado = value; }
        }

        public bool IsSuperAdmin
        {
            get { return _IsSuperAdmin; }
            set { this._IsSuperAdmin = value; }
        }

        public List<Rol> Roles
        {
            get { return _roles; }
            set { this._roles = value; }
        }


        public Area Area
        {
            get { return _Area; }
            set { _Area = value; }
        }

        public Puesto Puesto
        {
            get { return _Puesto; }
            set { _Puesto = value; }
        }

     
        public string Clave
        {
            get { return _Clave; }
            set { _Clave = value; }
        }
        


        #endregion
        
        #region Overrides
        /// <summary>
        /// Returns the string of the object.
        /// </summary>
        /// <returns>String</returns>
        public override string ToString()
        {
            return String.Format("({0}) - {1}", this.Nick, base.ToString());
        }
        #endregion
    }
}
